package cn.lm.activiti.spring.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author lm_jcf
 * @date 2020/3/26 13:54
 */
@Configuration
@EnableScheduling
public class ScheduleDemo {

    public static final Logger LOG = LoggerFactory.getLogger(ScheduleDemo.class);

    @Scheduled(fixedRate = 5000)
    public void timingPrint() {
        LOG.info("spring schedule");
        System.out.println("spring schedule");
    }

}
